﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Cashier.utils
{
    /// <summary>
    /// 正则表达式
    /// </summary>
    public class RegexExpress
    {
        /// <summary>
        /// 只能输入数字
        /// </summary>
        public const String NUMBER = "^[0-9]*$";

        /// <summary>
        /// 只能输入N位数字
        /// </summary>
        public const String NUMBER_ONLY_BITS = "^\\d{n}$";

        /// <summary>
        /// 只能输入零和非零开头的数字
        /// </summary>
        public const String ZERO_AND_NUMBER = "^(0|[1-9][0-9]*)$";

        /// <summary>
        /// 两位小数的正实数
        /// </summary>
        public const String DECIMAL_TWO_BITS = "^[0-9]+(.[0-9]{2})?$";

        /// <summary>
        /// 字母和数字组成的字符串
        /// </summary>
        public const String LETTER_NUMBER = "^[A-Za-z0-9]+$";
    }
}
